# HEALTH OF ONLINE COMMUNITIES
# Clean Names for edit byte data
#
# Remove IP addresses from data and replace underscores with spaces
# Remove pre-2003 data

import re
import sys


def main():
            
    for line in sys.stdin:
        pieces = line.split('\t')
        if not re.search(r'\b25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\b',user):
            print '\t'.join([user, pieces[1], pieces[2], pieces[3]]) #outputs only data from non-ip addresses



#used to remove data pre-2003
def eraseEarlyYears():

    for line in sys.stdin:
        pieces = line.split('\t')        
        user = pieces[0].replace('_',' ') #replaces underscores with spaces
        datetime = pieces[5]
        time = datetime.split('T')
        date = time[0]
        dates = date.split('-')
        year = dates[0]
        if not int(year) < 2003:
            print line.replace("\n", "")

eraseEarlyYears()
